#ifndef _SDLRENDERER_H_
#define _SDLRENDERER_H_

#include <SDL.h>
#include <Renderer/Renderer.h>

namespace Engine2D
{


    class SDLRenderer : public Renderer
    {
    public:
        SDLRenderer();        
        virtual ~SDLRenderer();
        void SetWindow(void * wind) override;
        void Clear(int r, int g, int b, int a = 255) override; 
        void Render() override;
        void* GetRenderer() override { return m_renderer; }
        void DrawPolygon(std::vector<Vertex> & vertex, std::vector<int> & indices = std::vector<int>()) override;
        void DrawTexture(std::shared_ptr<Texture> texture, std::optional<SLua_Rect> & src, std::optional<SLua_Rect> & dst) override;

    private:
        SDL_Renderer * m_renderer;
    };
} // namespace Engine2D


#endif